<!--#include file="Config.asp"-->
<!--#include file="emp_is.asp"-->
<!--#include file="Header.asp"-->
<%

intID=int(Request("id"))
ActionType=request("ActionType")
SaveType=request("SaveType")
set rs=server.createobject("adodb.recordset")

'Add
if ActionType="Add" or ActionType="" then
AName="确定增加"
URL="?SaveType=AddOK"
end if

'Mod
if ActionType="Mod" and intID<>"" then
AName="确定修改"
sql="select * from CRM_PersonProperty where id="&Intid
rs.open sql,conn,1,1
PersonPropertyname=Trim(rs("name"))
PersonPropertyInfo=Trim(rs("Info"))
PersonPropertyID=int(rs("id"))
rs.close
AID=intID
URL="?SaveType=ModOK&ID="&intID
end if

'SaveAdd
if SaveType="AddOK" and request("name")<>"" then
sql="select * from CRM_PersonProperty where id is null"
rs.open sql,conn,1,3
rs.addnew
rs("name")=Trim(Request("name"))
rs("Info")=Trim(Request("Info"))
rs("IsShow")=1
rs.Update
rs.close
end if

'SaveMod
if SaveType="ModOK" and intID<>"" and request("name")<>"" then
sql="select * from CRM_PersonProperty where id="&IntID
rs.open sql,conn,1,3
rs("name")=Trim(Request("name"))
rs("Info")=Trim(Request("Info"))
rs.Update
rs.close

end if
%>
<!--添加  -->
<table class="table">
<form method="post" action="<%=URL%>" name="form1">
<tr>
<td>
Name:<input type="text" name="name" value="<%=PersonPropertyname%>" size='40'>
Info:<input type="text" name="Info" value="<%=PersonPropertyInfo%>" size='40'>
<input type="submit" name="Submit" value="<%=aname%>">
<A HREF="?ActionType=Add">[<U><FONT COLOR="#FF0000"><B>增加</B></FONT></U>]</A>
</td>
</tr>
</form>
</table>

<table class="table">
<tr>
<td>操作</td>
<td>Name</td>
<td>Info</td>
<td>显示</td>
</tr>

<%
sql="select * from CRM_PersonProperty order by id"
rs.open sql,conn,1,1
for r=1 to rs.recordcount
%>
<tr>
<td><A HREF="?ActionType=Mod&ID=<%=rs("id")%>" title='点击修改<%=rs("name")%>'>修改[<%=rs("id")%>]</A></td>
<td><%=Trim(rs("name"))%></td>
<td><%=Trim(rs("info"))%></td>
<td>显示</td>
</tr>
<%
rs.moveNext
next
rs.close
%>
</TABLE>

<!--#include file="Footer.asp" -->